import request from '@/utils/request.js'

// 获取用户建议数据
export function getSuggestion () {
  return request({
    url: '/suggestion',
    method: 'get'
  })
}

// 获取全部反馈类型列表
export function getSuggestionTypeList () {
  return request({
    url: '/suggestionTypeList',
    method: 'get'
  })
}

// 获取选择的反馈类型数据
export function getSuggestionType (data) {
  return request({
    url: `/suggestion?suggestionTpye=${data}`,
    method: 'get'
  })
}
// 获取关键字搜索建议数据
export function getProblemTypeSearch (name) {
  return request({
    url: `/suggestion?problemType_like=${name}`,
    method: 'get'
  })
}
// 获取关键字搜索建议数据
export function getSuggestionTpyeSearch (name) {
  return request({
    url: `/suggestion?suggestionTpye_like=${name}&`,
    method: 'get'
  })
}
// 获取关键字搜索建议数据
export function getSuggestionContentSearch (name) {
  return request({
    url: `/suggestion?suggestionContent_like=${name}`,
    method: 'get'
  })
}
// 获取删除建议接口
export function delSuggestionId (id) {
  return request({
    url: '/suggestion/' + id,
    method: 'delete'
  })
}
